package libary;

public class KidBook extends Book{
    public KidBook() {
    }

    public KidBook(String name) {
        super(name, 21);
    }

    @Override
    public double calFines(int borrowingDays) {
        int delay = borrowingDays-super.getBorrowingPeriod();
        double fines;
        if (delay<=0){ // 没有延期
            fines = 0;
        }else { // 延期 每天1元
            fines = delay*1;
        }
        return fines;
    }
}
